 #{extends 'main.html' /}
<title>promoted Idea</title>
<br>
<a href="@{Application.createTask(did,promoted.id)}"> create task</a><br>
<form action="@{Application.addUserToPromotedIdea(did,promoted.id)}" method="post">
<br><h3>Add user:</h3><br>
please write his nickName and if found,the<br> nick name will be added to members list<br><br>
<input name="userName" type="text" />
<input name="Submit1" type="submit" value="add" />
</form>
<h1>${promoted.title}</h1><br>
<div align="center" >
Developers involved in the execution process:<br><br>
Organization Lead<br><br>
Department organizer<br><br>
#{list items:promoted.users, as:'user'}
Members: <br><br>
        ${user.nickName}<br>
#{/list}
</div>
<br>

#{if promoted.tasks}

<table style="width: 83%" align="center" border="1" cellspacing="0">
	<tr>
		<th>Task</th>
	    <th>Owner</th>
		<th>Summary</th>
		<th>Priority</th>
		<th>State</th>			
	</tr>
#{list items:promoted.tasks, as:'task'}
	<tr>
		<td><a href="@{Application.taskView(did,promoted.id,task.id)}">${task.title}</a></td>
		<td>${task.user}</td>
		<td>${task.content}</td>
		<td>
		#{if task.priorety==2}
		 Low
		#{/if} 
		#{if task.priorety==1}
		 Midum
		#{/if} 
		#{if task.priorety==3}
		 High
		#{/if} 
		</td>
		<td>	
	    #{if task.state==1}
		 New
		#{/if} 
		#{if task.state==2}
		 Started
		#{/if} 
		#{if task.state==3}
		 Bending
		#{/if}
		#{if task.state==4}
		 Done
	    #{/if} 
		#{if task.state==5}
		 Reopen
		#{/if}  
		</td>		
	</tr>
#{/list}
</table>	
#{/if}
#{else}
No tasks added yet for the project members !!
#{/else}